"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const vue = require("vue");
const _hoisted_1 = { class: "me-panel-header-inner" };
const _hoisted_2 = { class: "me-panel-header-left" };
const _hoisted_3 = { class: "me-panel-header-right" };
const _hoisted_4 = { class: "me-panel-header-right" };
const _hoisted_5 = { class: "me-panel-header-left" };
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
  ...{
    name: "me-panel-title"
  },
  __name: "panel-title",
  props: {
    title: {},
    reverse: { type: Boolean, default: false },
    background: {}
  },
  setup(__props) {
    const props = __props;
    const isColor = (color) => {
      return /^#|^rgba?|^radial-gradient|^linear-gradient/.test(color);
    };
    const currentStyle = vue.computed(() => {
      const { background } = props;
      return background ? isColor(background) ? { background, borderColor: background } : { background: `url(${background})`, backgroundSize: "100% 100%" } : {};
    });
    return (_ctx, _cache) => {
      return vue.openBlock(), vue.createElementBlock("div", {
        class: "me-panel-header",
        style: vue.normalizeStyle(currentStyle.value)
      }, [
        vue.createElementVNode("div", _hoisted_1, [
          vue.renderSlot(_ctx.$slots, "default", {}, () => [
            !_ctx.reverse ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
              vue.createElementVNode("div", _hoisted_2, [
                vue.renderSlot(_ctx.$slots, "title-icon"),
                vue.createElementVNode("span", null, vue.toDisplayString(_ctx.title), 1)
              ]),
              vue.createElementVNode("div", _hoisted_3, [
                vue.renderSlot(_ctx.$slots, "content")
              ])
            ], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
              vue.createElementVNode("div", _hoisted_4, [
                vue.renderSlot(_ctx.$slots, "content")
              ]),
              vue.createElementVNode("div", _hoisted_5, [
                vue.renderSlot(_ctx.$slots, "title-icon"),
                vue.createElementVNode("span", null, vue.toDisplayString(_ctx.title), 1)
              ])
            ], 64))
          ])
        ])
      ], 4);
    };
  }
});
exports.default = _sfc_main;
//# sourceMappingURL=panel-title.vue2.cjs.map
